using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessPlatform.Core;
using BusinessPlatform.Core.BusinessObject;
using BusinessPlatform.Core.BusinessObject.Mapping;
using BusinessPlatform.Core.BusinesObjectType;

namespace NewStartModels.Models.Menus
{
    /// <summary>
    /// 用户
    /// </summary>
    public class Menu : BusinessObjectBase, IMenu, ISimple
    {
        /// <summary>
        /// 用户
        /// </summary>
        public override string TableName
        {
            get { return "Menus"; }
        }
        #region properties

        /// <summary>
        /// 菜单编码
        /// </summary>
        [PropertyMapping(FieldName = "MenuUID", DbType = typeof(Int32), IsPrimary = true)]
        public System.Int32 MenuUID
        {
            get { return this.GetPropertyValue<System.Int32>("MenuUID"); }
            set { this.SetPropertyValue<System.Int32>("MenuUID", value); }
        }

        /// <summary>
        /// 父菜单
        /// </summary>
        [PropertyMapping(FieldName = "ParentUID", DbType = typeof(Int32))]
        public System.Int32 ParentUID
        {
            get { return this.GetPropertyValue<System.Int32>("ParentUID"); }
            set { this.SetPropertyValue<System.Int32>("ParentUID", value); }
        }

        /// <summary>
        /// 菜单名称
        /// </summary>
        [PropertyMapping(FieldName = "MenuName", DbType = typeof(String))]
        public System.String MenuName
        {
            get { return this.GetPropertyValue<System.String>("MenuName"); }
            set { this.SetPropertyValue<System.String>("MenuName", value); }
        }

        /// <summary>
        /// 菜单类型
        /// </summary>
        [PropertyMapping(FieldName = "MenuType", DbType = typeof(String))]
        public Data.Enumerator.BOMenuType MenuType
        {
            get { return this.GetPropertyValue<Data.Enumerator.BOMenuType>("MenuType"); }
            set { this.SetPropertyValue<Data.Enumerator.BOMenuType>("MenuType", value); }
        }

        /// <summary>
        /// 创建人
        /// </summary>
        [PropertyMapping(FieldName = "Creator", DbType = typeof(Int32))]
        public System.Int32 Creator
        {
            get { return this.GetPropertyValue<System.Int32>("Creator"); }
            set { this.SetPropertyValue<System.Int32>("Creator", value); }
        }

        /// <summary>
        /// 创建时间
        /// </summary>
        [PropertyMapping(FieldName = "CreateDate", DbType = typeof(DateTime))]
        public System.DateTime CreateDate
        {
            get { return this.GetPropertyValue<System.DateTime>("CreateDate"); }
            set { this.SetPropertyValue<System.DateTime>("CreateDate", value); }
        }

        /// <summary>
        /// 更新人
        /// </summary>
        [PropertyMapping(FieldName = "Updator", DbType = typeof(Int32))]
        public System.Int32 Updator
        {
            get { return this.GetPropertyValue<System.Int32>("Updator"); }
            set { this.SetPropertyValue<System.Int32>("Updator", value); }
        }

        /// <summary>
        /// 更新时间
        /// </summary>
        [PropertyMapping(FieldName = "UpdateDate", DbType = typeof(DateTime))]
        public System.DateTime UpdateDate
        {
            get { return this.GetPropertyValue<System.DateTime>("UpdateDate"); }
            set { this.SetPropertyValue<System.DateTime>("UpdateDate", value); }
        }

        /// <summary>
        /// 备注
        /// </summary>
        [PropertyMapping(FieldName = "Remarks", DbType = typeof(String))]
        public System.String Remarks
        {
            get { return this.GetPropertyValue<System.String>("Remarks"); }
            set { this.SetPropertyValue<System.String>("Remarks", value); }
        }

        #endregion

        /// <summary>
        /// 用户构造函数
        /// </summary>
        public Menu()
        {

        }
    }
}
